#include<iostream>
using namespace std;

int main()       //计算有效率并比较
{
    int n;
    cin >> n;
    int nums[n][2] = {};
    double x = 0;
    for (int i = 0;i<n;i++ )
    {
        if(i==0)
        {
            cin >> nums[i][0] >> nums[i][1];
            x = nums[i][1]/(double)nums[i][0];
        }
        else
        {
            cin >> nums[i][0] >> nums[i][1];
        }
    }
    for(int j=0;j<n;j++)
    {
        if(j==0)
        {
            continue;
        }
        double y = nums[j][1]/(double)nums[j][0];
        if(y-x>0.05)
        {
            cout << "better" << endl;
        }
        else if(x-y>0.05)
        {
            cout << "worse" << endl;
        }
        else
        {
            cout << "same" << endl;
        }
    }
    return 0;
}